<?php
/**
 * This template display header of all page.
 * @author Atom Studio
 * @date 2019-10-29
 */
?>
<!doctype html>
<html <?php language_attributes();?> >
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <?php wp_head(); ?>
    <link rel="icon shortcut" href="<?php echo get_theme_file_uri("assets/image/wd.icon") ?>">
</head>
<body <?php body_class(); ?> >
<header class="sticky-top">
    <nav class="navbar navbar-expand-lg container">
        <a href="<?php echo home_url();?>" class="navbar-brand"><img src="<?php echo atom_custom_logo();?>" alt="Made by Atom Studio" title="<?php bloginfo('title')?>"></a>
        <div class="search-popup-box ml-auto">
            <div class="icon  p-2 d-block d-md-none"><span class="fa fa-search"></span></div>
            <div class="popup-content">
                <div class="popup-close"><span class="fa fa-times"></span></div>
                <div class="popup-center">
                    <div class="info"></div>
                    <form name="formsearch" method="get" action="<?php bloginfo('url');?>">
                        <input name="s" id="search" type="text" class="text" value="" autocomplete="off" placeholder="输入搜索词然后回车进行搜索">
                        <button type="submit" class="submit"><span class="fa fa-search"></span></button>
                    </form>
                </div>
            </div>
        </div>
        <button class="navbar-toggler p-1 ml-sm-2" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="fa fa-reorder"></span>
        </button>
        <?php wp_nav_menu([
            "theme_location" => "main",
            "container" => "div",
            "container_class" => "collapse navbar-collapse",
            "container_id" => "navbarNav",
            "menu_class" => "navbar-nav",
            "link_after" => '<i class="fa fa-angle-down pl-md-1 d-none float-right float-md-none"></i>',
        ]) ?>
    </nav>

</header>
